package wzc.design_pattern.construction.composite;

/**
 * @Author 那和不是个啥
 * @Date 2025/7/20
 * @Description
 */

public class CompositePatternDemo {
    public static void main(String[] args) {
        Employee dev1 = new Developer("王五", "高级Java工程师");
        Employee dev2 = new Developer("郑六", "中级Java工程师");
        Employee manager = new Manager("李四", "软件研发部");

        Team team = new Team("码的快");
        team.addMember(dev1);
        team.addMember(dev2);

        Team company = new Team("码的快科技有限责任公司");
        company.addMember(manager);
        company.addMember(team);

        company.showDetails();
    }
}
